-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Don't merge code completion items having the same name. #12029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't merge code completion items having the same name. #12029
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM fro my side!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM!
* If several denotations share the same name, the type denotations appear before term denotations inside | ||
* the same `Completion`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this part of the comment should be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the comment instead for clarity
Also fix completion of references to primary constructor parameters
0cf4732
to
3ff472f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
.completion(m1, Set(("HashMap", Class, "java.util.HashMap"), | ||
("HashMap", Module, "java.util.HashMap$"), | ||
("HashMap2", Class, "java.util.HashMap"), | ||
("HashMap2", Module, "java.util.HashMap$"))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be an orthogonal issue: for a module, it is more friendly to show java.util.HashMap
instead of java.util.HashMap$
.
It can be addressed in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but that's because of how .show
works by default. An even more enigmatic example is
code"class Foo { val foo: Runn${m1} }".withSource
.completion(m1, Set(
("Runnable", Class, "java.lang.Runnable"),
("Runnable", Module, "Runnable$")
))
but that's definitely a separate issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍, AFAIC.
Don't merge code completion items having the same name.
Also fix completion of references to primary constructor parameters.
Fixes #11313
Fixes #12018
/cc @tgodzik @dos65 @alexarchambault